
package com.scalar.chiptrack.sales;

import java.io.Serializable;

import com.scalar.chiptrack.commons.Address;
import com.scalar.chiptrack.utils.StringUtils;

public class SalesPerson implements Serializable
{
    private String salesPerson = null;
    boolean disabled   = false;
    private int salesPersonId ;
    private String m_flag;

    Address address    = null; // Added by Veeru on 23rd Sep 2004
    private float salesPercent = 0.0f;
    private int regionId;
    private String region = null;
    private boolean salesAckMail;
    private boolean quoteAckMail;
    private boolean shipAlerts;

    public SalesPerson() {
    }

    public SalesPerson(int salespersonId,
					   String salesPersonName,
					   String flag){

		salesPerson = salesPersonName;
		salesPersonId = salespersonId;
		m_flag = flag;
	}

     public boolean getDisabled() {
        return disabled;
    }

    public void setDisabled (boolean disabled) {
       this.disabled = disabled;
    }

      public String getSalesPerson() {
          if( salesPerson != null ){
            salesPerson = salesPerson.trim() ;
        }
          return salesPerson;
    }
    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

     public String getEncodeSalesPerson()
     {
        String encodeSalesPerson = null;
        if(salesPerson != null)
        {
            encodeSalesPerson = StringUtils.encodeAllSpecialCharacters(salesPerson);
        }
        return encodeSalesPerson;
    }

    public void setSalesPerson (String salesPerson) {
        if( salesPerson != null ){
            salesPerson = salesPerson.trim() ;
        }
        this.salesPerson = salesPerson;
    }

    public int getSalesPersonId() {
        return salesPersonId;
    }

    public void setSalesPersonId(int salesPersonId) {
        this.salesPersonId = salesPersonId;
    }

    public String getFlag() {
        return m_flag;
    }

    public void setFlag(String flag) {
        this.m_flag = flag;
    }

    public float getSalesPercent() {
        return salesPercent;
    }

    public void setSalesPercent(float salesPercent) {
        this.salesPercent = salesPercent;
    }

    public int getRegionId() {
        return regionId;
    }

    public void setRegionId(int regionId) {
        this.regionId = regionId;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public boolean isSalesAckMail() {
        return salesAckMail;
    }

    public void setSalesAckMail(boolean salesAckMail) {
        this.salesAckMail = salesAckMail;
    }

    public boolean isQuoteAckMail() {
        return quoteAckMail;
    }

    public void setQuoteAckMail(boolean quoteAckMail) {
        this.quoteAckMail = quoteAckMail;
    }

    public boolean isShipAlerts() {
        return shipAlerts;
    }

    public void setShipAlerts(boolean shipAlerts) {
        this.shipAlerts = shipAlerts;
    }
}